Note that before installing the NuGet packages, you need to create a Visual Studio project of the desired type. The NuGet packages get installed "into" the project.
Using Package Manager GUI
This text assumes that you are using Visual Studio 2022. With other tools, the procedures may be different, but should be reasonably similar.
In order to install a OPC Data Client or OPC Wizard NuGet package and reference it from your project using the Package Manager GUI:
- In the Visual Studio Solution Explorer window, right-click the project, and select .
- Make sure that Package source is set to “nuget.org”.
- For OPC Data Client, type QuickOpc into the Search box. For OPC Wizard, type OpcWizard into the Search box. A list of available OPC Data Client or OPC Wizard packages appears.
- Click on the package you are interested in. Its details appear in the pane next (right) to it.
- If needed, select a specific version of the package.
- Press the Install button. A Preview windows appears, summarizing the changes that are about to be made.
- Review the changes, and press the OK button.
- The NuGet client will now update your project as needed. Among other things, it will download and copy over the OPC Data Client or OPC Wizard assemblies, and reference them.
- A “readme.txt” file appears in the editor, with additional information. It is recommended that you read the file.
- You can now start using the types from the referenced OPC Data Client or OPC Wizard assemblies.
If you do not see the packages in the NuGet Package Manager, make sure your project's framework is set to .NET Framework 4.7.2 or later, or .NET 6 or 8.
Using Package Manager Console
This text assumes that you are using Visual Studio 2022. With other tools, the procedures may be different, but should be reasonably similar.
In order to install a OPC Data Client or OPC Wizard NuGet package and reference it from your project using Package Manager Console:
- In the Visual Studio, select .
- Make sure that Package source is set to “nuget.org”.
- In the Default project drop-down, select the project.
- Enter command Install-Package Id, where Id is the package ID of the package to install (for example, OpcLabs.QuickOpc, or OpcLabs.OpcWizard). Press Enter.
- The NuGet client will now update your project as needed. Among other things, it will download and copy over the OPC Data Client or OPC Wizard assemblies, and reference them.
- A “readme.txt” file appears in the editor, with additional information. It is recommended that you read the file.
- You can now start using the types from the referenced OPC Data Client or OPC Wizard assemblies.
Switch to PackageReference
It is recommended that you switch your project to the PackageReference model (see PackageReference in project files). To do, right-click on the References node in the Solution Explorer window, and select command.
More information: Migrate from packages.config to PackageReference
See Also
Introduction
Getting Started